<template>
	<view class="">
		<view class="mainCon main-wrap" :class="{show:loaded}">
			<jyf-parser :html="content"></jyf-parser>
			<mix-loading v-if="isLoading"></mix-loading>
		</view>
	</view>
</template>

<script>
import jyfParser from '@/components/jyf-parser/jyf-parser.vue';
export default {
	data() {
		return {
			content: ''
		};
	},
	onLoad(options) {
		this.id = options.id;
		this.setNavTitle(options.title);
		this.loadData();
	},
	methods: {
		async loadData() {
			const res = await this.$request('content/question-answer', { id: this.id }, { showLoading: true });
			if (res.result == 0) {
				this.content = res.data.detail;
			} else {
				this.$uti.msg(res.resultNote);
			}
		}
	}
};
</script>

<style scoped>
.mainCon {
	padding: 20upx;
}
</style>
